<template>
    <div style="background-color: aquamarine;">
        {{ message }}
        <button @click="greet()">问候</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            message:'hello,,'
        }
    },
    methods:{
        greet(){
        this.message='hello,,'+this.$attrs.name+'!'
        }
    }
}
</script>